<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div class="main-top">
    <div class="am-g am-u-sm-centered">
        <div class="am-u-lg-9 am-u-sm-6" style="padding: 0;">
            <div class="main-top-newpost">
                <?php if($this->is('post')): ?>
                    <h1><?php $this->title() ?></h1>
                <?php elseif($this->is('page')): ?>
                    <h1><?php $this->title() ?></h1>
                <?php else: ?>
                    <h1><?php $this->options->title(); ?></h1>
                <?php endif; ?>
            </div>
        </div>
        <div class="am-u-lg-3 am-u-sm-6" style="text-align: right;padding-right: 0;">
            <div class="main-top-menu">
                <?php if($this->is('post')): ?>
                    <select data-am-selected="{btnWidth: '70%', btnSize: 'sm', btnStyle: 'secondary'}" onchange="window.location=this.value;">
	                    <option value="<?php $this->options->siteUrl(); ?>">返回首页</option>
	                    <?php $this->widget('Widget_Metas_Category_List')
	                        ->parse('<option value="{permalink}">{name}</option>'); ?>
                	</select>
                <?php elseif($this->is('page')): ?>
                    <select data-am-selected="{btnWidth: '70%', btnSize: 'sm', btnStyle: 'secondary'}" onchange="window.location=this.value;">
	                    <option value="<?php $this->options->siteUrl(); ?>">返回首页</option>
	                    <?php $this->widget('Widget_Metas_Category_List')
	                        ->parse('<option value="{permalink}">{name}</option>'); ?>
                	</select>
                <?php else: ?>
                    <select data-am-selected="{btnWidth: '70%', btnSize: 'sm', btnStyle: 'secondary'}" onchange="window.location=this.value;">
                    	<option value="#">选择分类</option>
                    	<?php $this->widget('Widget_Metas_Category_List')
                        ->parse('<option value="{permalink}">{name}</option>'); ?>
                	</select>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>